<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">

<head th:replace="header :: common_header(~{::title},~{::link})">
<title>秒到2.0综合管理后台-编辑商户</title>
<link th:href="@{/assets/pages/css/bootstrap-fileinput.css}"
	rel="stylesheet" type="text/css" />
</head>

<body
	class="page-header-fixed page-sidebar-closed-hide-logo page-content-white">
	<div class="page-wrapper">
		<div class="page-header navbar navbar-fixed-top"
			th:insert="~{index :: navbar-top}"></div>
		<div class="clearfix"></div>
		<div class="page-container">
			<div class="page-sidebar-wrapper" th:insert="~{index :: sidebar}">
			</div>
			<div class="page-content-wrapper">
				<div class="page-content">
					<!--<div class="page-bar">
                        <ul class="page-breadcrumb">
                            <li>
                                <a href="#">首页</a>
                                <i class="fa fa-circle"></i>
                            </li>
                            <li>
                                <a href="#">业务管理</a>
                                <i class="fa fa-circle"></i>
                            </li>
                            <li>
                                <span>商户管理</span>
                            </li>
                        </ul>
                    </div>-->


					<form class="form-horizontal" role="form" id="modal_new_role"
						action="/p/biz/tenant/edittenant">
						<!-- <input type="hidden" name="id" th:value="${tenant?.id}"> -->
						<div class="form-group"  >
								<div class="col-md-5" >
									<span class="help-block text-center" ></span> 
									<input type="hidden" name="id" th:value="${tenant?.id}">
								</div>
							</div>
						<div class="form-group">
							<label for="firstname" class="col-sm-2 control-label"><span
									class="required"> * </span>手机号</label>
							<div class="col-sm-6">
								<input type="text" class="form-control"
									th:value="${tenant?.phone}" name="phone" placeholder="请输入手机号"
									maxlength="11" readonly>
							</div>
						</div>
						<div class="form-group">
							<label for="inputPassword" class="col-sm-2 control-label">
								用户账号 </label>
							<div class="col-sm-6">
								<input class="form-control" type="text"
									th:value="${tenant?.phone}" placeholder="账号自动生成" readonly>
							</div>
						</div>
						<div class="form-group">
							<label for="inputPassword" class="col-sm-2 control-label">
								商户编号 </label>
							<div class="col-sm-6">
								<input class="form-control" type="text"
									th:value="${tenant?.code}" name="code" placeholder="自动生成"
									readonly>
							</div>
						</div>
						<div class="form-group">
							<label for="inputPassword" class="col-sm-2 control-label">
								屡受关系 </label>
							<div class="col-sm-6">
								<input class="form-control" th:value="${OperatorName}"
									type="text" placeholder="自动生成" readonly>
							</div>
						</div>
						<div class="form-group">
							<label for="firstname" class="col-sm-2 control-label"><span
									class="required"> * </span>产品模板</label>
							<div class="col-sm-6">
							<!--  	<select class="col-sm-6 form-control" name="templateId">
									<option value="">请选择模板</option>
									<option th:each="template : ${templates}"
										th:selected="${template.name ==tenant.templateId }"
										th:text="${template.name}" th:value="${template.name}"></option>
								</select>
							-->
							<input class="form-control" type="hidden"  name="templateId"
									th:value="${tenant.templateId}"  >
									<input class="form-control" type="text" 
									th:value="${tenant.template}"  readonly>
							</div>
						</div>
						
						<div class="form-group">
							<label for="firstname" class="col-sm-2 control-label"><span
									class="required"> * </span>行业类目</label>
							<div class="col-sm-6">
							<!-- 	<select class="col-sm-6 form-control" name="category">
									<option value="">请选择类目</option>
									<option th:each="industry : ${listIndustry}"
										th:selected="${industry.category ==tenant.category }"
										th:text="${industry.category}" th:value="${industry.category}"></option>
								</select> -->
									<input class="form-control" type="text"
									th:value="${tenant.category}" readonly>
							</div>
						</div>
						
						<div class="form-group">
							<label for="firstname" class="col-sm-2 control-label"><span
									class="required"> * </span>店铺名称</label>
							<div class="col-sm-6">
								<input type="text" class="form-control"
									th:value="${tenant?.name}" name="name" placeholder="请输入店铺名称" maxlength="15">
							</div>
						</div>
						<div id="distpicker" data-toggle="distpicker">
							<div class="form-group">
								<lable class="col-md-2 control-label"> <span
									class="required"> * </span>省份：</lable>
								<div class="col-sm-6">
									<select class="form-control" name="province"
										th:value="${tenant?.province}"></select>
								</div>
							</div>
							<div class="form-group">
								<lable class="col-md-2  control-label"> <span
									class="required"> * </span>城市：</lable>
								<div class="col-sm-6">
									<select class="form-control" name="city"
										th:value="${tenant?.city}">
									</select>
								</div>
							</div>
						</div>

						<div class="form-group">
							<label for="firstname" class="col-sm-2 control-label"><span
									class="required"> * </span>地址</label>
							<div class="col-sm-6">
								<input type="text" class="form-control"
									th:value="${tenant?.address}" name="address" placeholder="" maxlength="50">
							</div>
						</div>

						<!-- <div class="form-group" id="uploadForm" enctype='multipart/form-data'>
    <label for="" class="col-sm-2 control-label">上传logo</label>
                <div class="fileinput fileinput-new col-sm-1" data-provides="fileinput"  id="exampleInputUpload">
                    <div class="fileinput-new thumbnail" style="width: 200px;height: auto;max-height:150px;">
                        <img id='picImg' style="width: 100%;height: auto;max-height: 140px;" th:src="@{/assets/global/img/noimage.png}" alt="" />
                    </div>
                    <div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 200px; max-height: 150px;"></div>
                    <div>
                        <span class="btn btn-primary btn-file">
                            <span class="fileinput-new">选择文件</span>
                            <span class="fileinput-exists">换一张</span>
                            <input type="file" name="pic1" id="picID" accept="image/gif,image/jpeg,image/x-png"/>
                        </span>
                        <a href="javascript:;" class="btn btn-warning fileinput-exists" data-dismiss="fileinput">移除</a>
                    </div>
                </div>
            </div> -->
						<div class="form-group">
							<div class="col-sm-offset-2 col-sm-10">
								<button type="button" class="btn blue btn-info" id="update">保存</button>
								<button type="button" class="btn red btn-info"
									onclick="beback();">返回</button>
							</div>
						</div>
					</form>
				</div>
				<div class="page-footer">
					<div class="page-footer-inner">
						2017 &copy; 秒迅科技</a>
					</div>
					<div class="scroll-to-top">
						<i class="icon-arrow-up"></i>
					</div>
				</div>
			</div>
			<!-- 业务js -->
			<!--   <script th:src="@{/assets/pages/scripts/bootstrap-fileinput.js}" type="text/javascript"></script> -->
			<!-- 业务js -->
			<script th:src="@{/assets/pages/scripts/tenants.js}"
				type="text/javascript"></script>
				 <script th:inline="javascript">
			var provincetxt = [[${tenant.province}]];
			var citytxt = [[${tenant.city}]];
			//省市区赋值
			$("#distpicker").distpicker({
			  province: provincetxt,
			  city: citytxt
			});
		</script>
</body>
</html>